(function($){$.extend({metadata:{defaults:{type:'class',name:'metadata',cre:/({.*})/,single:'metadata'},setType:function(type,name){this.defaults.type=type;this.defaults.name=name;},get:function(elem,opts){var settings=$.extend({},this.defaults,opts);if(!settings.single.length)settings.single='metadata';data="{}";if(settings.type=="class"){var m=settings.cre.exec(elem.className);if(m)
data=m[1];}else if(settings.type=="elem"){if(!elem.getElementsByTagName)return;var e=elem.getElementsByTagName(settings.name);if(e.length)
data=$.trim(e[0].innerHTML);}else if(elem.getAttribute!=undefined){var attr=elem.getAttribute(settings.name);if(attr)
data=attr;}
if(data.indexOf('{')<0)
data="{"+data+"}";data=eval("("+data+")");$.data(elem,settings.single,data);return data;}}});$.fn.metadata=function(opts){return $.metadata.get(this[0],opts);};})(jQuery);;;(function($){$.fn.navmenu=function(options){options=$.extend({},$.fn.navmenu.defaults,options||{});return this.each(function(){var navTimeout,homePage,cachedDivs={},currentHoverPage;var $navMenu=$(this);var $parent=$navMenu.parent();if($parent.hasClass('right')||$parent.hasClass('center'))
$parent.height($navMenu.height());for(i in options.pageInfo){var page=options.pageInfo[i];if(page.P==0){homePage=page;break;}}
var activePages={};var currentPage=options.pageInfo["a"+pageCode],parentPage;if(currentPage){activePages[currentPage.C]=1;while(1){parentPage=getParentPage(currentPage);if(!parentPage)
break;if(homePage&&parentPage.C==homePage.C)
break;currentPage=parentPage;activePages[currentPage.C]=1;}}
function getDivs(pageCode){if(cachedDivs[pageCode])
return cachedDivs[pageCode];var $divs=$();for(i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=pageCode)
continue;if(page.C in activePages)
var linkClass="activeLink";else
var linkClass="";linkClass+=" nav {pageCode:"+page.C+",parentId:"+page.P+"}";var target="";if(page.R){var url=page.R;target=page.RT;}else if(page.U){var url=page.U;}else{var url="javascript:void(0)";}
$divs=$divs.add($("<div>",{"class":"linkDiv"}).append($("<a>",{href:url,"class":linkClass,html:page.N,target:target})));}
cachedDivs[pageCode]=$divs;return $divs;}
function getParentPage(childPage){for(i in options.pageInfo){var page=options.pageInfo[i];if(childPage.P==page.C)
return page;}}
$("a",$navMenu).each(function(){var data=$(this).metadata();if(data.pageCode in activePages)
$(this).addClass("activeLink");});$("a.topLevel",$navMenu).mouseover(function(){clearTimeout(navTimeout);var data=$(this).metadata();if(currentHoverPage==data.pageCode)
return;currentHoverPage=data.pageCode;if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();if(homePage&&data.pageCode==homePage.C)
return;var $divs=getDivs(data.pageCode);if($divs.length==0)return;var offset=$(this).offset();var parentWidth=$(this).parent().width();if(options.alignment=="Vertical"){var top=offset.top;var left=offset.left+parentWidth;}else{var top=offset.top+$(this).parent().height()
var left=offset.left;}
if(options.animate)
var display="none";else
var display="block";var $div=$("<div>",{"class":"subLevel",css:{top:top,left:left,minWidth:parentWidth,display:display,zIndex:100}}).append($divs).appendTo('body');if(options.animate)
$div.slideDown("fast");}).each(function(){var data=$(this).metadata();var page=options.pageInfo["a"+data.pageCode];if(page&&page.R){$(this).attr("href",page.R).attr("target",page.RT);}});$('div.linkDiv a').live('mouseover',function(){clearTimeout(navTimeout);var offset=$(this).offset();var data=$(this).metadata();$("div.child-of-"+data.parentId).remove();var $divs=getDivs(data.pageCode);if($divs.length==0)return;var top=offset.top;var left=offset.left+$(this).parent().width();$("<div>",{"class":"subLevel child child-of-"+data.parentId,css:{top:top,left:left}}).append($divs).appendTo('body');});$('a.topLevel,a.nav').live('mouseout',function(){navTimeout=setTimeout(function(){currentHoverPage=0;if(options.animate){$('div.subLevel').slideUp('fast',function(){$(this).remove();});}else{$('div.subLevel').remove();}},1000);});(function(){var $crumbs=$("#breadCrumbs");if($crumbs.length==0||$crumbs.data("initialized")==true)
return;$crumbs.data("initialized",true);if(pageCode==homePage.C){return;}
var i=0;var html="";var currentPage=options.pageInfo["a"+pageCode];if(!currentPage){return;}
while(1){var parentPage=getParentPage(currentPage);if(!parentPage)break;i++;if(currentPage.C==pageCode)
var linkClass="activeCrumb";else
var linkClass="";html='<a href="'+currentPage.U+'" target="'+currentPage.T+'" class="'+linkClass+'">'
+currentPage.N+'</a> &gt; '+html;currentPage=parentPage;}
if(i<3){return;}
html=html.substring(0,html.length-6);html='<a href="'+homePage.U+'">'+homePage.N+'</a> &gt; '+html;$crumbs.html(html).show();})();(function(){if(homePage&&pageCode==homePage.C)
return;var $clickUnder=$("#clickUnder");if($clickUnder.length==0||$clickUnder.data("initialized")==true)
return;$clickUnder.data("initialized",true);var currentPage=options.pageInfo["a"+pageCode];var topLevelPage;if(!currentPage)return;while(1){var parentPage=getParentPage(currentPage);if(homePage&&parentPage.C==homePage.C){break;}
if(homePage&&parentPage.P==homePage.C){topLevelPage=parentPage;break;}
currentPage=parentPage;}
if(!topLevelPage)topLevelPage=currentPage;var $divs=$();for(i in options.pageInfo){var page=options.pageInfo[i];if(topLevelPage.C!=page.P)
continue;if(options.alignment!="Vertical"&&page.N.substring(0,1)==" "){page.N=page.N.split(" ").join("&nbsp;");}
if(page.C in activePages)
var linkClass="activeLink";else
var linkClass="";linkClass+=" clickLink nav {pageCode:"+page.C+",parentId:"+page.P+"}";$divs=$divs.add($("<div>",{"class":"clickLinkDiv linkDiv",mouseover:function(){if(options.animate)
$('div.subLevel').slideUp('fast',function(){$(this).remove();});else
$('div.subLevel').remove();},mouseout:function(){currentHoverPage=0;}}).append($("<a>",{href:page.U,target:page.T,"class":linkClass,html:page.N})));}
if(options.alignment=="Vertical")
$clickUnder.remove().appendTo($("a.activeLink").parent()).append($divs);else
$clickUnder.append($divs);})();(function(){$footer=$("#superFooter");if($footer.length==0||!homePage)return;var $ul=$("ul","#superFooterParent"),maxHeight=0;$ul.each(function(){var $this=$(this);var data=$this.metadata();for(var i in options.pageInfo){var page=options.pageInfo[i];if(page.P!=data.pageCode)continue;var $newLi=$("li:first",$this).clone();$("a",$newLi).html(page.N).attr("href",page.U);$newLi.appendTo($this);}});$("li.parent","#superFooterParent").each(function(){var height=$(this).height();if(height>maxHeight)maxHeight=height;}).each(function(){$(this).height(maxHeight+"px");});})();});}
$.fn.navmenu.defaults={pageInfo:[],alignment:"Vertical",animate:false};})(jQuery);;$(function() {for (var i in tasks) {window.setTimeout(tasks[i], 0);}});function initMenu(){};$(function(){$("#navMenu").navmenu({pageInfo:{"a12435":{"P":0,"ID":609517,"C":12435,"O":0,"U":"http:\/\/www.bluecactus.co.nz\/","N":"Home","T":"_top","R":"","RT":"_blank"},"a12436":{"P":12435,"ID":37609,"C":12436,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/hair-design-wellington.html","N":"About","T":"_top","R":"","RT":"_blank"},"a137998":{"P":12436,"ID":138002,"C":137998,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/comments-clients.html","N":"Comments from Clients","T":"_top","R":"","RT":"_blank"},"a12437":{"P":12435,"ID":583808,"C":12437,"O":"2","U":"http:\/\/www.bluecactus.co.nz\/hair-stylist-wellington.html","N":"Team Profile","T":"_top","R":"","RT":"_blank"},"a40961":{"P":12435,"ID":582210,"C":40961,"O":"3","U":"http:\/\/www.bluecactus.co.nz\/hair-dresser-prices.html","N":"Services","T":"_top","R":"","RT":"_blank"},"a12439":{"P":40961,"ID":37612,"C":12439,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/wedding-hair-design.html","N":"Wedding","T":"_top","R":"","RT":"_blank"},"a12438":{"P":12435,"ID":571916,"C":12438,"O":"4","U":"http:\/\/www.bluecactus.co.nz\/hair-designer-wellington.html","N":"The Latest...","T":"_top","R":"","RT":"_blank"},"a598901":{"P":12438,"ID":616300,"C":598901,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/page598901.html","N":"Events","T":"_top","R":"","RT":"_blank"},"a37607":{"P":12435,"ID":577026,"C":37607,"O":"5","U":"http:\/\/www.bluecactus.co.nz\/hair-colouring-specialists.html","N":"Fashion","T":"_top","R":"","RT":"_blank"},"a540534":{"P":37607,"ID":559322,"C":540534,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/ultimatemakeover.html","N":"Ultimate Makeover","T":"_top","R":"","RT":"_blank"},"a559332":{"P":540534,"ID":575931,"C":559332,"O":"2","U":"http:\/\/www.bluecactus.co.nz\/annas-story.html","N":"Anna's Story...","T":"_top","R":"","RT":"_blank"},"a561242":{"P":540534,"ID":562762,"C":561242,"O":"3","U":"http:\/\/www.bluecactus.co.nz\/ultimate-makeover-day.html","N":"The Big Day","T":"_top","R":"","RT":"_blank"},"a563928":{"P":540534,"ID":563930,"C":563928,"O":"4","U":"http:\/\/www.bluecactus.co.nz\/anna-s-nominations.html","N":"Anna's nominations","T":"_top","R":"","RT":"_blank"},"a38184":{"P":37607,"ID":478854,"C":38184,"O":"2","U":"http:\/\/www.bluecactus.co.nz\/hairdresser-wellington.html","N":"Photo Gallery","T":"_top","R":"","RT":"_blank"},"a45080":{"P":37607,"ID":45081,"C":45080,"O":"3","U":"http:\/\/www.bluecactus.co.nz\/hairdressing-models-wellington.html","N":"Models wanted","T":"_top","R":"","RT":"_blank"},"a292898":{"P":300032,"ID":292902,"C":292898,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/staff-club.html","N":"Staff Club ","T":"_top","R":"","RT":"_blank"},"a128113":{"P":119047,"ID":128151,"C":128113,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/page128151.html","N":"Who's does what?","T":"_top","R":"","RT":"_blank"},"a128110":{"P":119047,"ID":128153,"C":128110,"O":"2","U":"http:\/\/www.bluecactus.co.nz\/page128153.html","N":"HR","T":"_top","R":"","RT":"_blank"},"a120237":{"P":118968,"ID":128154,"C":120237,"O":"3","U":"http:\/\/www.bluecactus.co.nz\/page128154.html","N":"Clients","T":"_top","R":"","RT":"_blank"},"a120230":{"P":118968,"ID":128155,"C":120230,"O":"4","U":"http:\/\/www.bluecactus.co.nz\/page128155.html","N":"Training ","T":"_top","R":"","RT":"_blank"},"a120231":{"P":120230,"ID":128156,"C":120231,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/page128156.html","N":"Training - apprentices","T":"_top","R":"","RT":"_blank"},"a120233":{"P":120230,"ID":128157,"C":120233,"O":"2","U":"http:\/\/www.bluecactus.co.nz\/page128157.html","N":"Training - Creative","T":"_top","R":"","RT":"_blank"},"a120234":{"P":118968,"ID":128158,"C":120234,"O":"5","U":"http:\/\/www.bluecactus.co.nz\/page128158.html","N":"Stock","T":"_top","R":"","RT":"_blank"},"a120238":{"P":118968,"ID":128159,"C":120238,"O":"6","U":"http:\/\/www.bluecactus.co.nz\/page128159.html","N":"Management","T":"_top","R":"","RT":"_blank"},"a399083":{"P":12435,"ID":576400,"C":399083,"O":"7","U":"http:\/\/www.bluecactus.co.nz\/latest-products.html","N":"Product Profile","T":"_top","R":"","RT":"_blank"},"a423008":{"P":399083,"ID":597699,"C":423008,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/promotions.html","N":"Promotions","T":"_top","R":"","RT":"_blank"},"a593984":{"P":12435,"ID":614373,"C":593984,"O":"8","U":"http:\/\/www.bluecactus.co.nz\/bc-goes-green.html","N":"BC goes Green","T":"_top","R":"","RT":"_blank"},"a426853":{"P":12435,"ID":581290,"C":426853,"O":"9","U":"http:\/\/www.bluecactus.co.nz\/hair-points.html","N":"hAir Points ","T":"_top","R":"","RT":"_blank"},"a45077":{"P":12435,"ID":392658,"C":45077,"O":"10","U":"http:\/\/www.bluecactus.co.nz\/hairdressing-jobs-wellington.html","N":"Career","T":"_top","R":"","RT":"_blank"},"a37608":{"P":12435,"ID":37615,"C":37608,"O":"11","U":"http:\/\/www.bluecactus.co.nz\/hair-dressing-salon.html","N":"Contact","T":"_top","R":"","RT":"_blank"},"a334535":{"P":37608,"ID":334539,"C":334535,"O":"1","U":"http:\/\/www.bluecactus.co.nz\/blue-cactus-customer.html","N":"Customer Feedback","T":"_top","R":"","RT":"_blank"}},alignment:"Horizontal",animate:0})});